<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
request.setCharacterEncoding("utf-8");
response.setContentType("text/html;charset=utf-8");
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
  <head>
    <title>注册界面</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link href="<%=basePath%>/css2/style.css" rel='stylesheet'/>
	<script language="javascript" src="<%=basePath%>/js2/register.js"></script>
  </head>
  <body>
<div class="content0" >
  	<img alt="images/logoko.png" src="images/logoko.png"><br><br>
  	<h2>短视频，就来V+视频</h2>
  	<br><h2>为您提供最优秀的短视频</h2>
</div>
<div class="content2">
		<div class="content1">
		<form action="servlet/Register_Servlet" method="post" onsubmit="return mycheck();">
			<table border="0" cellspacing="0">
					<tr align="center">
						<td></td>
						<td colspan="2"><h1>用户注册</h1></td>
					</tr>	
					<tr align="center">
						<td>用户名:</td>
						<td><input type="text" name="username" id="username"></td>
						<td><span id="username_span" style="color: red">*</span></td>
					</tr>
					<tr align="center">
						<td>密 码:</td>
						<td><input type="password" name="psw_one" id="psw_one"></td>
						<td><span id="psw_two_span" style="color: red">*</span></td>
					</tr>
					<tr align="center">
						<td>确认密码:</td>
						<td><input type="password" name="psw_two" id="psw_two"><br></td>
						<td><span id="psw_two_span" style="color: red">*</span></td>
					</tr>
					<tr align="center">
						<td>性 别:</td>
						<td><input type="radio" name="gender" value="male"/>男<input type="radio" name="gender" value="female" checked/>女</td>
						<td></td>
					</tr>
					<tr align="center">
						<td>年 龄:</td>
						<td><input type="text" name="age" id="age"
						  onkeyup="this.value=value.replace(/[^\d]/g,'')"					  
                          onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
						></td>
						<td><span id="age_span" style="color: red">*</span></td>
					</tr>
					<tr align="center">
						<td>爱 好:</td>
						<td><input type="text" name="hobby" ></td>
						<td></td>
					</tr>
					<tr align="center">
						<td>自我介绍：</td>
						<td><input type="text" name="text" ></textarea></td>
						<td></td>
					</tr>	
					<tr align="center">
						<td></td>
						<td colspan="2"><input type="submit" id="regBtn" class="register" value="注册"></td>
					</tr>	
		</table>
		</form>
		<%
      String error = (String)request.getSession().getAttribute("error2");
      if(error!=null){
          out.println("<font color='red'>"+error+"</font><br>");
      }
   %>		
	</div>						
</div>
<div class="last2"> © 2018 V+视频 All rights reserved.</div>
</body>
</html>
